<!--
 * @Author: nns4
 * @Date: 2020-12-11 13:28:59
 * @LastEditors: nns4
 * @FilePath: /studyNote/vue/src/views/test/sendInfo/provideinject/son.vue
 * @Description: 儿子组件
-->
<template>
    <div class="son">
        <div class="borders">
            儿子说： <input v-model="说的话" @keyup="father.儿子说的方法(说的话)" type="text">
            <grandSon />
        </div>

    </div>
</template>


<script>
    import grandSon from "./grandSon"
    export default {
        components: {
            grandSon
        },
        data() {
            return {
                说的话: ""
            }
        },
        /* 引入父组件 */
        inject: ['father'],

    }
</script>

<style lang="less" scoped>
    .son {
        margin: 20px;
    }

    .borders {
        border: red solid;
    }
</style>